package com.resign.carl.lang;

/**
 * Created by carl.zhao on 2016/6/14.
 */
public class ServiceException extends RuntimeException {
    private static final long serialVersionUID = 415436633263046104L;
    private RETURN_CODE errorCode;

    public ServiceException(String msg) {
        super(msg);
    }

    public ServiceException(RETURN_CODE errorCode) {
        this.errorCode = errorCode;
    }

    public ServiceException(RETURN_CODE errorCode, String msg) {
        super(msg);
        this.errorCode = errorCode;
    }

    public ServiceException(RETURN_CODE errorCode, Throwable cause) {
        super(cause);
        this.errorCode = errorCode;
    }

    public ServiceException(RETURN_CODE errorCode, String message, Throwable cause) {
        super(message, cause);
        this.errorCode = errorCode;
    }

    public RETURN_CODE getErrorCode() {
        return this.errorCode;
    }

    public void setErrorCode(RETURN_CODE errorCode) {
        this.errorCode = errorCode;
    }
}
